home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 3561 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.8 KB  |  49 lines

  1. Newsgroups: comp.lang.c,comp.unix.osf.misc,comp.unix.osf.osf1,comp.unix.ultrix
  2. Path: bunyip.cc.uq.oz.au!un!news
  3. From: al012@svtstu.seqeb.gov.au (Anthony Lee)
  4. Subject: (Summary of response) Re: File descriptor equivalent of fflush?
  5. X-Nntp-Posting-Host: 147.209.150.100
  6. Message-ID: <DLytFp.Dp5@un.seqeb.gov.au>
  7. Sender: news@un.seqeb.gov.au (USENET News System)
  8. Organization: Your Organization
  9. X-Newsreader: WinVN 0.93.14
  10. References: <DLxHsx.7Ko@un.seqeb.gov.au>
  11. Mime-Version: 1.0
  12. Date: Mon, 29 Jan 1996 23:04:36 GMT
  13.  
  14. In article <DLxHsx.7Ko@un.seqeb.gov.au>, al012@svtstu.seqeb.gov.au says...
  15. >
  16. >Dear all,
  17. >
  18. >I am trying to find an equivalent of fflush for file descriptors
  19. >in ULTRIX and OSF.  
  20. >
  21.  
  22. Many thanks to all those people who send me replies.
  23. Two people told me that I don't need to flush because
  24. read and write are not buffered.
  25.  
  26. But then the man pages for write on ULTRIX had this
  27.  
  28. >By default, write does asynchronous writes.  That is, after the data is
  29. >written to a buffer cache, control returns to the program.  The actual
  30. >write to a device takes place after control returns.  However, if you
  31. >use an open or fcntl call to open a file for synchronous writes, control
  32. >does not return to the program until after the buffer cache has been
  33. >written to the device.
  34.  
  35. Several people suggested that I use fsync but be aware that on
  36. ULTRIX fsync will flush all buffers.
  37.  
  38. -- 
  39. Anthony Lee        These are my opinions and not SEQEB.
  40. SEQEB                                            
  41. 150 Charlotte Street                   ..--  __o 
  42. Brisbane                          ....--   _ \<,_               
  43. Qld 4000                         ____     (_)/ (_)                         
  44. Australia
  45. voice:+61 7 3407 4541            Death to the Daleks!!!!
  46. fax:  +61 7 3407 4607
  47. email: AL012@svtstu.seqeb.gov.au
  48.  
  49.